if SERVER then
	registerCommand("ghost", "Turn on/off invisibility on the player you specify", function(param)
		local ghostOn = "caller ghosted target"
		local ghostOff = "caller unghosted target"
		if param["settings"]["ghost_msg_on"] then
			ghostOn = param["settings"]["ghost_msg_on"]
		end
		if param["settings"]["ghost_msg_off"] then
			ghostOff = param["settings"]["ghost_msg_off"]
		end
		local ghostTable = {}
		ghostTable["caller"] = getCaller(param[1])
		local targs = string.Explode(" ", param[3])
		for i, targ in pairs(targs) do
			local plyTarg = getPlayerByName(targ)
			if plyTarg then
				ghostTable["target"] = plyTarg:GetName()
				if (not plyTarg["moocow_ghost"]) || plyTarg["moocow_ghost"] == -1 then
					plyTarg["moocow_ghost"] = 1
					plyTarg:SetNoDraw(true)
					plyTarg:DrawViewModel(false)
					plyTarg:DrawWorldModel(false)
					display(param[1], "ghost", { plyTarg } , parseDisplayMessage(ghostOn, ghostTable))
				else
					plyTarg["moocow_ghost"] = -1
					plyTarg:SetNoDraw(false)
					plyTarg:DrawViewModel(true)
					plyTarg:DrawWorldModel(true)
					display(param[1], "ghost", { plyTarg } , parseDisplayMessage(ghostOff, ghostTable))
				end
			end
		end
	end)
	
	local function weaponUpdate(ply, move)
		if ply["moocow_ghost"] == 1 then
			ply:DrawViewModel(false)
			ply:DrawWorldModel(false)
		end
	end
	hook.Add("Move", "moocow_ghostmove", weaponUpdate)
	
end